package com.tattermedia.allthataudio.misc;

public class TimeFomatter {
	
	public static String format(int ms) {
		StringBuffer sb = new StringBuffer();
		
		int hour = ms / (1000 * 60 * 60);
		
		if (hour != 0) {
			sb.append(hour + ":");
		}
		
		ms %= 1000 * 60 * 60;
		
		int min = ms / (1000 * 60);
		sb.append(min + ":");
		
		ms %= 1000 * 60;
		
		int sec = ms / 1000;
		sb.append(String.format("%02d", sec));	
		
		return sb.toString();
	}
}
